package com.genius.auth.bo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(value = "修改密码BO", description = "从客户端，由用户传入的数据封装在此entity中")
public class UpdatePasswordBO {
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z\\W]{6,18}$", message = "密码必须包含字母和数字，且在6-18位之间")
    @ApiModelProperty("密码")
    private String password;


    @NotBlank(message = "验证码不能为空")
    @Pattern(regexp = "^[a-zA-Z\\d]{6}$", message = "验证码格式不正确")
    @ApiModelProperty("验证码")
    private String checkCode;
}